"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const components_1 = require("@tarojs/components");
const taro_ui_1 = require("taro-ui");
const left_png_1 = require("./left.png");
require("./index.scss");
const taro_1 = require("@tarojs/taro");
const Look = () => {
    // const [list, setList] = useState([
    //   { title: '看过'
    //   },
    //   { title: '未看'
    //   }
    // ]
    // )
    const [current, setcurrent] = react_1.useState(0);
    //
    // const List = list.map((content) => (
    //   <View className="hd">
    //     <AtTabs>
    //       <AtTabsPane onClick={() => setcurrent(current + 1)}>
    //         <View style='font-size:18px;text-align:center;height:100px;'>{content.title}</View>
    //       </AtTabsPane>
    //     </AtTabs>
    //   </View>
    // ))
    const handleClick1 = value => {
        setcurrent(value);
    };
    const tabList = [{ title: '标签页1' }, { title: '标签页2' }];
    const handleClick = () => {
        taro_1.default.navigateTo({
            url: '/pages/my/index',
        });
    };
    return (<components_1.View className="box">
      <components_1.View className="box1">
        <components_1.Image style="width:25px;height:25px" src={left_png_1.default} onClick={handleClick}/>
      </components_1.View>
      <components_1.View className="box2">我的营养计划</components_1.View>
      <components_1.View className="box3">

        <taro_ui_1.AtTabs current={current} tabList={tabList} onClick={current => { handleClick1(current); }}>
          <taro_ui_1.AtTabsPane current={current} index={0}>
            <components_1.View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页一的内容</components_1.View>
          </taro_ui_1.AtTabsPane>
          <taro_ui_1.AtTabsPane current={current} index={1}>
            <components_1.View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</components_1.View>
          </taro_ui_1.AtTabsPane>
        </taro_ui_1.AtTabs>

      </components_1.View>


    </components_1.View>);
};
exports.default = Look;
//# sourceMappingURL=index.jsx.map